/**
 * @description 人员信息
 * @author zhongshigui
 * @since
 */

import { PersonnelServiceApi } from "./_personnel";
import { AxiosResponse } from "axios";
import { objectToUrlParams } from "/@/utils/common";
import service from "/@/utils/request";

class GetOrgTreeServiceApi extends PersonnelServiceApi {
  getOrgTree(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/getOrgTree";
    url += objectToUrlParams(params, true);
    return service.get(url, { params: { ...bean } });
  }
  getOrgInfo(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/getOrgInfo";
    url += objectToUrlParams(params, true);
    return service.get(url, { params: { ...bean } });
  }
}
export const getOrgTreeServiceApi = new GetOrgTreeServiceApi(
  "/MdmOrganizationService"
);
class GetPersonInfoServiceApi extends PersonnelServiceApi {
  pageQueryPersonInfo(bean: any, params?: any): Promise<AxiosResponse<any>> {
    let url = this.baseUrl + "/pageQueryPersonInfo";
    url += objectToUrlParams(params, true);
    return service.post(url, bean);
  }
}
export const getPersonInfoServiceApi = new GetPersonInfoServiceApi(
  "/MdmPersonService"
);
